package com.bsoft.gol.hcs.clinical.dao;


import ctd.persistence.annotation.DAOMethod;
import ctd.persistence.annotation.DAOParam;
import ctd.persistence.support.hibernate.HibernateSupportDelegateDAO;
import hcn.base.reviewdrug.FootNote;

import java.util.List;

public abstract class FootNoteDAO extends HibernateSupportDelegateDAO<FootNote> {
    @DAOMethod(sql = " from FootNote where hospitalCode =:hospitalCode and footNoteStatus = 1  order by sort asc")
    public abstract List<FootNote> queryFootNote(@DAOParam("hospitalCode") String hospitalCode);

    @DAOMethod(sql = " from FootNote where hospitalCode =:hospitalCode and footNoteStatus = 1 and footNoteCode=:footNoteCode ")
    public abstract List<FootNote> queryFootNoteByFootNoteCode(@DAOParam("hospitalCode") String hospitalCode, @DAOParam("footNoteCode") String footNoteCode);

    @DAOMethod(sql = " from FootNote where hospitalCode =:hospitalCode  and footNoteCode =:footNoteCode ")
    public abstract FootNote queryFootNoteByDicItemCode(@DAOParam("footNoteCode") String footNoteCode,@DAOParam("hospitalCode") String hospitalCode);

    @DAOMethod(sql = " from FootNote where hospitalCode =:hospitalCode  and dicItemId =:dicItemId ")
    public abstract FootNote queryFootNoteByDicItemId(@DAOParam("dicItemId") Integer dicItemId,@DAOParam("hospitalCode") String hospitalCode);
}
